package com.zhisheng.web17.demos.mapper;

import com.zhisheng.web17.demos.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 创建者： 智晟全哥
 */
public interface UserMapper {

    @Insert("insert into users values (null,#{name},#{age})")
    @Options(useGeneratedKeys = true,keyProperty = "id")
    public int insertUser(User user);

    @Select("select * from users")
    List<User> selectAll();


    int delById(Integer id);
}
